package com.woniu.guoguo.service.impl;

import com.woniu.guoguo.model.Restaurant;
import com.woniu.guoguo.dao.RestaurantMapper;
import com.woniu.guoguo.service.IRestaurantService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Richie
 * @since 2020-11-02
 */
@Service
public class RestaurantServiceImpl extends ServiceImpl<RestaurantMapper, Restaurant> implements IRestaurantService {

    @Autowired
    private RestaurantMapper restaurantMapper;

    @Override
    public List<Restaurant> getCloseRestaurants(double myLnt, double myLat) {
        return restaurantMapper.getCloseRestaurants(myLnt, myLat);
    }

    @Override
    public void addMoneyByRestaurantId(Integer restaurantId,Double money) {
        restaurantMapper.addMoneyByRestaurantId(restaurantId,money);
    }

}
